<div>
    <h2 id="page-heading">
        <span jhiTranslate="jhipsterSampleApplicationApp.bankAccount.home.title">Bank Accounts</span>

        <button id="jh-create-entity" class="btn btn-primary float-right jh-create-entity create-bank-account" [routerLink]="['/bank-account/new']">
            <fa-icon icon="plus"></fa-icon>
            <span  jhiTranslate="jhipsterSampleApplicationApp.bankAccount.home.createLabel">
            Create a new Bank Account
            </span>
        </button>
    </h2>

    <jhi-alert-error></jhi-alert-error>

    <jhi-alert></jhi-alert>

    <div class="alert alert-warning" id="no-result" *ngIf="bankAccounts?.length === 0">
        <span jhiTranslate="jhipsterSampleApplicationApp.bankAccount.home.notFound">No bankAccounts found</span>
    </div>

    <div class="table-responsive" id="entities" *ngIf="bankAccounts && bankAccounts.length > 0">
        <table class="table table-striped" aria-describedby="page-heading">
            <thead>
                <tr>
                    <th scope="col" ><span jhiTranslate="global.field.id">ID</span></th>
                    <th scope="col" ><span jhiTranslate="jhipsterSampleApplicationApp.bankAccount.name">Name</span></th>
                    <th scope="col" ><span jhiTranslate="jhipsterSampleApplicationApp.bankAccount.balance">Balance</span></th>
                    <th scope="col" ><span jhiTranslate="jhipsterSampleApplicationApp.bankAccount.user">User</span></th>
                    <th scope="col"></th>
                </tr>
            </thead>
            <tbody>
                <tr *ngFor="let bankAccount of bankAccounts ;trackBy: trackId">
                    <td><a [routerLink]="['/bank-account', bankAccount.id, 'view']">{{ bankAccount.id }}</a></td>
                    <td>{{ bankAccount.name }}</td>
                    <td>{{ bankAccount.balance }}</td>
                    <td>
                        {{ bankAccount.user?.login }}
                    </td>
                    <td class="text-right">
                        <div class="btn-group">
                            <button type="submit"
                                    [routerLink]="['/bank-account', bankAccount.id, 'view']"
                                    class="btn btn-info btn-sm">
                                <fa-icon icon="eye"></fa-icon>
                                <span class="d-none d-md-inline" jhiTranslate="entity.action.view">View</span>
                            </button>

                            <button type="submit"
                                    [routerLink]="['/bank-account', bankAccount.id, 'edit']"
                                    class="btn btn-primary btn-sm">
                                <fa-icon icon="pencil-alt"></fa-icon>
                                <span class="d-none d-md-inline" jhiTranslate="entity.action.edit">Edit</span>
                            </button>

                            <button type="submit" (click)="delete(bankAccount)"
                                    class="btn btn-danger btn-sm">
                                <fa-icon icon="times"></fa-icon>
                                <span class="d-none d-md-inline" jhiTranslate="entity.action.delete">Delete</span>
                            </button>
                        </div>
                    </td>
                </tr>
            </tbody>
        </table>
    </div>
</div>
